package com.ggs.DTO;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.time.LocalDate;

@Data
public class UserDTO {

    @NotNull
    private long id;
    @Pattern(regexp ="^[a-zA-Z][a-zA-Z0-9_.]{2,15}$")
    private String username;
    @Pattern(regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[!@#$%^&*])[A-Za-z\\d!@#$%^&*]{8,20}$")
    private String password;


    @Pattern(regexp ="^[a-zA-Z][a-zA-Z0-9]{3,10}$")
    private String nickname;
    @NotEmpty
    @Email
    private String email;
    private String userPic;
    private LocalDate createTime;
    private LocalDate updateTime;
}
